Code 38 Continue On Possession, Else Branch Within Encounters.
ID Extra Codes ID
Use: Allows you to check for a specific item and branch depending on whether or not someone in the party possess it. This is similar to CODE 21 which allows you to branch to different encounters/Action Points, however, this code lets you branch to different scripts within a specific encounter.
Options: None
E-Codes: 1) Item ID to check for.
2) 0 = Cont On Poss, 1 = Cont not Poss
3) 0 = X-AP, 1 = Within simple, 2 = Within complex
4) X-AP/Branch No. (0-3 if within encounter)
5) Code No. (0 = top Code/ID)
E-Code 3) Lets you send the party to an X-AP or, if they are already inside of a simple or complex encounter, you can shift them to a different result script.
Simple and Complex encounters have 4 scripts built into them that handle the choices of the party. If you want, you can use a Code 38 to shift them from one to another depending on whether or not they have a specific item.
As an example, assume you are executing script Result no. 1 and check to see if they have Item X. If they do, you can send them to Result no. 4.
It's just a fancy way to move them about inside a simple or complex encouter. It does not all the frequent a thing to do really but its there.
E-Code 5) Code No. (0 = top Code/ID) If you change them to a different result script, you can either start them at the top of the script, or you can start them part way down the script. If you place a value of 3 here, it would start them at the 4th Code/ID pair (0 counts as the top) of the new script you sent them to.